{% extends '@SyliusCore/Email/layout.html.twig' %}

{% block subject %}
    {{ 'sylius.email.admin_password_reset.subject'|trans({}, null, localeCode)|raw }}
{% endblock %}

{% block body %}
    {% autoescape false %}
        <div style="font-family: sans-serif; background: #eee; padding-top: 30px; padding-bottom: 30px; font-size: 16px; color: #333; line-height: 1.5">
            <div style="max-width: 600px; margin: 20px auto;">
                <div style="margin-bottom: 30px; text-align: center;">
                    <img src="{{ absolute_url(asset('bundles/syliusui/images/logo.png')) }}" alt="Sylius" style="width: 170px">
                </div>

                <div style="background: #fff; padding: 40px 30px;">
                    {{ block("content") }}
                </div>

                <div style="text-align: center; padding: 20px 0;">
                    <a href="https://sylius.com" target="_blank" style="color: #1abb9c; text-decoration: none;">sylius.com</a>
                </div>
            </div>
        </div>
    {% endautoescape %}
{% endblock %}

{% block content %}
    <div style="text-align: center; margin-bottom: 30px;">
        <div style="font-size: 24px;">
            {{ 'sylius.email.admin_password_reset.hello'|trans({}, null, localeCode) }} <strong>{{ adminUser.firstName }} {{ adminUser.lastName }}</strong><br>
        </div>
        {% if sylius_bundle_loaded_checker('SyliusAdminBundle') %}
            {{ 'sylius.email.password_reset.to_reset_your_password'|trans({}, null, localeCode) }}:
        {% else %}
            {{ 'sylius.email.admin_password_reset.to_reset_your_password_token'|trans({}, null, localeCode) }}:
        {% endif %}
    </div>

    <div style="text-align: center;">
        {% if sylius_bundle_loaded_checker('SyliusAdminBundle') %}
            {% set url = url('sylius_admin_render_password_reset', {'token': adminUser.passwordResetToken}) %}
            <a href="{{ url|raw }}" style="display: inline-block; text-align: center; background: #1abb9c; padding: 18px 28px; color: #fff; text-decoration: none; border-radius: 3px;">
                {{ 'sylius.email.admin_password_reset.reset_your_password'|trans({}, null, localeCode) }}
            </a>
        {% else %}
            {{ 'sylius.email.admin_password_reset.token'|trans({}, null, localeCode) }}: {{ adminUser.passwordResetToken }}
        {% endif %}
    </div>
{% endblock %}
